package com.bank.model.enums;

import lombok.Getter;

/**
 * @author Cejay1314
 * @version 1.0
 * @create 2023/3/29 12:08
 */
@Getter
public enum LoanTypeEnum {

    CreditLoan(1,"CreditLoan"),
    MortgageLoan(2, "MortgageLoan")

    ;
    private Integer code;
    private String message;
//    private String china;

    private LoanTypeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
//    private LoanTypeEnum(Integer code, String message,String china) {
//        this.code = code;
//        this.message = message;
//        this.china = china;
//    }

    public static String gertName(int code){
        for(LoanTypeEnum item: values()){
            if(item.getCode()==code){
                return item.message;
            }
        }
        return "";
    }
}
